


//
//  BuyPineView.m
//  jiMuOperate
//
//  Created by 胡梅方 on 16/5/5.
//  Copyright © 2016年 jinXinFengLi. All rights reserved.
//

#import "BuyPineView.h"

@implementation BuyPineView
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        CGFloat labelX = 15;
        CGFloat labelW = 100;
        CGFloat labelH = 30;
        UILabel *currentQuan = [ARC createLabelWithFrame:CGRectMake(labelX, 0, labelW, labelH) Font:BYPiFont Text:@"当前数量:"];
        self.currentQuaty = currentQuan;
        [self addSubview:currentQuan];
        UILabel *currentNum = [ARC createLabelWithFrame:CGRectMake(105, 0, labelW, labelH) Font:BYPiFont Text:@""];
        self.currentNum = currentNum;
        [self addSubview:currentNum];
        
        UILabel *afterBuy = [ARC createLabelWithFrame:CGRectMake(labelX, labelH, 100, labelH) Font:BYPiFont Text:@"购买后数量:"];
        self.afterpurQuaty = afterBuy;
        [self addSubview:afterBuy];
        UILabel *afterBuyNum = [ARC createLabelWithFrame:CGRectMake(105, labelH, 100, labelH) Font:BYPiFont Text:@""];
        self.afterPurNum = afterBuyNum;
        [self addSubview:afterBuyNum];
        
        UILabel *puchaseQuan = [ARC createLabelWithFrame:CGRectMake(labelX, labelH*2, 100, labelH) Font:BYPiFont Text:@"购买数量:"];
        self.purchaseQuaty = puchaseQuan;
        [self addSubview:puchaseQuan];
        
        
//        UITextField *puchaseField = [ARC createTextFieldWithFrame:CGRectMake(105, labelH*2, 150, labelH) Font:BYPiFont-1 Placeholder:@"请输入购买数量" SecureTextEntry:NO];
        JMTextField *puchaseField = [JMTextField createTextFieldWithFrame:frame
                                                                      Font:BYPiFont
                                                               Placeholder:@"请输入购买数量"
                                                           SecureTextEntry:NO
                                                                 TextColor:[UIColor blackColor]];

        self.purchaseNum = puchaseField;
        puchaseField.frame = CGRectMake(105, labelH*2, 150, labelH);
        puchaseField.borderStyle = UITextBorderStyleRoundedRect;
        puchaseField.clearsOnBeginEditing=YES;
        [self addSubview:puchaseField];
        
        UILabel *totalPric = [ARC createLabelWithFrame:CGRectMake(labelX, labelH*3, 100, labelH) Font:BYPiFont Text:@"总价格:"];
        self.totalPrice = totalPric;
        [self addSubview:totalPric];
        
        UILabel *totalNum = [ARC createLabelWithFrame:CGRectMake(105, labelH*3, 100, labelH) Font:BYPiFont Text:@""];
        self.totalNum = totalNum;
        [self addSubview:totalNum];
        
        UILabel *titleLab = [ARC createLabelWithFrame:CGRectMake(labelX, labelH*4+10, 320, 20) Font:BYPiFont-1 Text:@"绿松果使用条件:"];
        self.titleLabel = titleLab;
        [self addSubview:titleLab];
        
        
        UILabel *firstLab = [ARC createLabelWithFrame:CGRectMake(labelX, labelH*5, 320, 20) Font:BYPiFont-1 Text:@"1.补齐亏欠松籽继续投票可以使帐号解冻"];
        self.firstTitlL = firstLab;
        [self addSubview:firstLab];
        
        
        UILabel *secondLab = [ARC createLabelWithFrame:CGRectMake(labelX, labelH*5+20, 320, 20) Font:BYPiFont-1 Text:@"2.银行卡的开户人必须与实名认证一致"];
        self.secondTitlL = secondLab;
        [self addSubview:secondLab];
        self.currentQuaty.textColor = [UIColor blackColor];
        self.currentNum.textColor = [UIColor blackColor];
        self.afterpurQuaty.textColor = [UIColor blackColor];
        self.afterPurNum.textColor = [UIColor blackColor];
        self.purchaseQuaty.textColor = [UIColor blackColor];
        self.purchaseNum.textColor = [UIColor blackColor];
        self.totalPrice.textColor = [UIColor blackColor];
        self.totalNum.textColor = [UIColor blackColor];
        self.titleLabel.textColor = [UIColor grayColor];
        self.firstTitlL.textColor = [UIColor grayColor];
        self.secondTitlL.textColor = [UIColor grayColor];
        
        
        self.currentQuaty.textAlignment = NSTextAlignmentLeft;
        self.currentNum.textAlignment = NSTextAlignmentLeft;
        self.afterpurQuaty.textAlignment = NSTextAlignmentLeft;
        self.afterPurNum.textAlignment = NSTextAlignmentLeft;
        self.purchaseQuaty.textAlignment = NSTextAlignmentLeft;
        self.purchaseNum.textAlignment = NSTextAlignmentLeft;
        self.totalPrice.textAlignment = NSTextAlignmentLeft;
        self.totalNum.textAlignment = NSTextAlignmentLeft;
        self.titleLabel.textAlignment = NSTextAlignmentLeft;
        self.firstTitlL.textAlignment = NSTextAlignmentLeft;
        self.secondTitlL.textAlignment = NSTextAlignmentLeft;

        
        
        self.currentQuaty.frame = [ToolViewAndData MyAutoLayout:self.currentQuaty];
        self.currentNum.frame = [ToolViewAndData MyAutoLayout:self.currentNum];
        self.afterpurQuaty.frame = [ToolViewAndData MyAutoLayout:self.afterpurQuaty];
        self.afterPurNum.frame = [ToolViewAndData MyAutoLayout:self.afterPurNum];
        self.purchaseQuaty.frame = [ToolViewAndData MyAutoLayout:self.purchaseQuaty];
        self.purchaseNum.frame = [ToolViewAndData MyAutoLayout:self.purchaseNum];
        self.totalPrice.frame =[ToolViewAndData MyAutoLayout:self.totalPrice];
        self.totalNum.frame = [ToolViewAndData MyAutoLayout:self.totalNum];
        self.titleLabel.frame =[ToolViewAndData MyAutoLayout:self.titleLabel];
        self.firstTitlL.frame =[ToolViewAndData MyAutoLayout:self.firstTitlL];
        self.secondTitlL.frame =[ToolViewAndData MyAutoLayout:self.secondTitlL];
  
        
    }
    return self;
}


@end
